package com.imooc.coupon.dao;

import com.imooc.coupon.constant.CouponStatus;
import com.imooc.coupon.entity.Coupon;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * 接口定义
 */
public interface CouponDao extends JpaRepository<Coupon,Integer> {
    //根据userId状态寻找优惠券记录
    List<Coupon> findAllByUserIdAndStatus(Long userId, CouponStatus status);

}
